#!/bin/bash
export ii=$II
export i=$I
if [[ "$1" = "-r" ]] ; then
  shift 2
fi
fn=$(basename $1)
dir=$(dirname $1)
msg="$2"
if [[ -z "$msg" ]] ; then
  echo "No log msg" >&2
  exit 1
fi
ndir=${dir##$ii/}
if [[ "$ndir" != "$dir" ]] ; then
  dir=$ndir
fi
#set -x
cd $dir
cvs commit -m "$msg" $fn
#cvs admin -kb $fn
